// 
// File:   Serversocket.h
// Author: dnazarov
//
// Created on 12 Октябрь 2009 г., 11:44
//

#ifndef _SERVERSOCKET_H
#define	_SERVERSOCKET_H

#include "sockets/ISocketHandler.h"
#include "sockets/TcpSocket.h"
#include "serverstat.h"
//#include "bot/bot.h"


class ServerStat;
class Bot;

class ServerSocket : public TcpSocket
{
public:
	ServerSocket(ISocketHandler &);
	~ServerSocket();

	void OnConnect();
	void OnLine(const std::string& );
        void setCommand(const std :: string &str) { m_cmd = str; };
        void setReplyHandler(ServerStat * reply_handler) {if(reply_handler)
                m_replyHandler = reply_handler;}
        void setReplyHandler(Bot * reply_handler) {if(reply_handler)
                m_botHandler = reply_handler;}

private:
	std::string m_cmd;
        ServerStat *m_replyHandler;
        Bot * m_botHandler;
       
};


#endif	/* _ServerSOCKET_H */
